package com.googlecode.kipler.container.dl;

import com.googlecode.kipler.syntax.formula.ConceptAssertion;
import com.googlecode.kipler.syntax.formula.ConceptDefinition;
import com.googlecode.kipler.syntax.formula.Formula;
import com.googlecode.kipler.syntax.formula.ObjectRoleAssertion;
import com.googlecode.kipler.syntax.formula.RoleAssertion;
import com.googlecode.kipler.syntax.formula.RoleInclusion;
import com.googlecode.kipler.syntax.formula.SameIndividualAssertion;


/**
 * 
 * @author İnanç Seylan
 *
 */
public class FormulaHolderDecider {
	public enum Holder {
		TBOX, ABOX, PBOX, RBOX
	};

	public static Holder decide(Formula f) {
		Holder result;
		if (f instanceof ConceptAssertion || f instanceof ObjectRoleAssertion
				|| f instanceof SameIndividualAssertion) {
			result = Holder.ABOX;
		} else if (f instanceof ConceptDefinition) {
			result = Holder.TBOX;
		} else if (f instanceof RoleInclusion || f instanceof RoleAssertion) {
			result = Holder.RBOX;
		} else {
			result = Holder.PBOX;
		}
		return result;
	}
}
